-
Notifications
You must be signed in to change notification settings - Fork 227
In Project Explorer, ensure "Select All" (Ctrl+A and menu) works reliably irrespective of first or subsequent selections. #3534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
a63f01a to
98792b8
Compare
| } | ||
|
|
||
| // no-ops for the other methods: | ||
| @Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the methods have default implementations so these stubs are just useless noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested, removed them.
| // Immediate fallback: handle Ctrl+A at the Tree level | ||
| commonViewer.getTree().addKeyListener(new KeyAdapter() { | ||
| @Override | ||
| public void keyPressed(KeyEvent e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, CommonViewer is a base class in CNF and can be extended. Adding key and part listeners that consumes key or register handlers here directly might affect others code. So please carefully change the code here, it is not only about Project Explorer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow it seems like a hack to handle this one key directly, especially given the key binding appears to be configurable:
Let me check on it.
98792b8 to
a3fe77d
Compare
reliably irrespective of first or subsequent selections.
a3fe77d to
a49db52
Compare

Fixes #2739
Description:
In the Project Explorer, the "Edit > Select All" menu item and Ctrl+A shortcut did not work reliably when a single project was selected. Specifically, pressing Ctrl+A after selecting a project for the first time had no effect. Only after clicking another project did Ctrl+A begin to work as expected.
Details of the fix:
Note : No-ops - These methods are required by the IPartListener2 interface though unused but must be implemented. Yeah - i just tried even if removed it works(not sure if it added some warnings).
Open eclipse freshly, open Project Explorer view. Select a project and ctrl+A to select all the projects.

Before fix(unable to select, next click on 2nd project then ctrl+A will be enabled)
After fix(able to select)
